<script setup lang="ts">
import { ref } from 'vue';

const swipeOptions = ref([
  {
    text: '删除',
    style: {
      backgroundColor: '#dd524d',
      color: '',
      fontSize: '',
    },
  },
  {
    text: '编辑',
    style: {
      backgroundColor: '#0000ff',
      color: '',
      fontSize: '',
    },
  },
])

const onClick = (e: any)=>{
  console.log(e);
  
}
</script>

<template>
  <uni-swipe-action>
    <uni-swipe-action-item :left-options="swipeOptions" :right-options="swipeOptions" @click="onClick">
      <view class="box">
        <text>滑动操作</text>
      </view>
    </uni-swipe-action-item>
  </uni-swipe-action>
</template>

<style scoped>
  .box{
    width: 100%;
    height: 120rpx;
    background-color: pink;
    display: flex;
    justify-content: center;
    align-items: center;
  }
</style>
